/*
 * @Descripttion:
 * @version:
 * @Author: cxguo
 * @Date: 2019-12-13 17:04:37
 * @LastEditors: cxguo
 * @LastEditTime: 2020-11-12 16:37:52
 */
import Layout from '@/layout'

export default {
  path: '/setup',
  component: Layout,
  redirect: 'noRedirect',
  meta: { title: '设置', icon: 'shezhi' },
  name: 'Setup',
  children: [
    {
      path: 'sys_role_list',
      name: 'sysRoleList',
      component: () => import('@/views/setup/role/index.vue'),
      meta: { title: '角色管理', pid: 'setup1', perm: 'sysRole:list' }
    },
    {
      path: 'sys_role_add',
      name: 'sysRoleAdd',
      hidden: true,
      component: () => import('@/views/setup/role/add.vue'),
      meta: { title: '新增角色', pid: 'setup1', perm: 'sysRole:add' }
    },
    {
      path: 'sys_role_edit',
      name: 'sysRoleEdit',
      hidden: true,
      props: (route) => ({ id: route.query.id }),
      component: () => import('@/views/setup/role/add.vue'),
      meta: { title: '修改角色', pid: 'setup1', perm: 'sysRole:edit' }
    },
    {
      path: 'sys_role_setting',
      name: 'sysRoleSetting',
      hidden: true,
      props: (route) => ({ id: route.query.id }),
      component: () => import('@/views/setup/role/setting.vue'),
      meta: { title: '角色设置权限', pid: 'setup1', perm: 'sysRole:setting' }
    },
    {
      path: 'role_list',
      component: () => import('@/views/sys-manager/role'),
      name: 'RoleList',
      meta: { title: '角色权限', pid: 'setup1', perm: 'role:list' }
    },
    {
      path: 'role_permissions',
      props: (route) => ({ rId: route.query.id, roleName: route.query.roleName }),
      component: () => import('@/views/sys-manager/role/role-permission.vue'),
      name: 'RolePermissions',
      hidden: true,
      meta: { title: '编辑角色权限', pid: 'setup1', perm: 'role:adedit' }
    },
    //
    {
      path: 'business_setup',
      name: 'BusinessSetup',
      component: () => import('@/views/setup/business/index.vue'),
      meta: { title: '业务设置', pid: 'setup2', perm: 'busetup:oper' }
    },
    {
      path: 'sys_reset',
      name: 'SysReset',
      component: () => import('@/views/setup/sys-reset/index.vue'),
      meta: { title: '系统重置', pid: 'setup3', perm: 'system:reset' }
    },
    {
      path: 'sys_resource_list',
      name: 'sysResourceList',
      component: () => import('@/views/setup/resource/index.vue'),
      meta: { title: '系统资源', pid: 'setup1', perm: 'sysResource:list' }
    },
    {
      path: 'sys_resource_add',
      name: 'sysResourceAdd',
      hidden: true,
      component: () => import('@/views/setup/resource/add.vue'),
      meta: { title: '新增系统资源', pid: 'setup1', perm: 'sysResource:add' }
    },
    {
      path: 'sys_resource_edit',
      name: 'sysResourceEdit',
      hidden: true,
      props: (route) => ({ id: route.query.id }),
      component: () => import('@/views/setup/resource/add.vue'),
      meta: { title: '修改系统资源', pid: 'setup1', perm: 'sysResource:edit' }
    },
    {
      path: 'sys_area_list',
      name: 'sysAreaList',
      hidden: false,
      props: (route) => ({ id: route.query.id }),
      component: () => import('@/views/setup/area/index.vue'),
      meta: { title: '区域管理', pid: 'setup1', perm: 'sysArea:list' }
    },
    {
      path: 'sys_application_list',
      name: 'sysApplicationList',
      component: () => import('@/views/setup/application/index.vue'),
      meta: { title: '应用管理', pid: 'setup1', perm: 'sysApplication:list' }
    },
    {
      path: 'sys_application_add',
      name: 'sysApplicationAdd',
      hidden: true,
      component: () => import('@/views/setup/application/add.vue'),
      meta: { title: '新增应用', pid: 'setup1', perm: 'sysApplication:add' }
    },
    {
      path: 'sys_application_edit',
      name: 'sysApplicationEdit',
      hidden: true,
      props: (route) => ({ id: route.query.id }),
      component: () => import('@/views/setup/application/add.vue'),
      meta: { title: '修改应用', pid: 'setup1', perm: 'sysApplication:edit' }
    },
    {
      path: 'sys_application_detail',
      name: 'sysApplicationDetail',
      hidden: true,
      props: (route) => ({ id: route.query.id }),
      component: () => import('@/views/setup/application/detail.vue'),
      meta: { title: '应用详情', pid: 'setup1', perm: 'sysApplication:detail' }
    },
    {
      path: 'sys_user_list',
      name: 'sysUserList',
      component: () => import('@/views/setup/user/index.vue'),
      meta: { title: '用户管理', pid: 'setup3', perm: 'sysUser:list' }
    },
    {
      path: 'sys_user_add',
      name: 'sysUserAdd',
      hidden: true,
      component: () => import('@/views/setup/user/add.vue'),
      meta: { title: '新增用户', pid: 'setup3', perm: 'sysUser:add' }
    },
    {
      path: 'sys_user_edit',
      name: 'sysUserEdit',
      hidden: true,
      props: (route) => ({ id: route.query.id }),
      component: () => import('@/views/setup/user/add.vue'),
      meta: { title: '修改用户', pid: 'setup3', perm: 'sysUser:edit' }
    },
    {
      path: 'sys_user_detail',
      name: 'sysUserDetail',
      hidden: true,
      props: (route) => ({ id: route.query.id }),
      component: () => import('@/views/setup/user/detail.vue'),
      meta: { title: '用户详情', pid: 'setup3', perm: 'sysUser:detail' }
    },
    {
      path: 'sys_account_list',
      name: 'sysAccountList',
      component: () => import('@/views/setup/account/index.vue'),
      meta: { title: '账户管理', pid: 'setup3', perm: 'sysAccount:list' }
    },
    {
      path: 'sys_account_add',
      name: 'sysAccountAdd',
      hidden: true,
      props: (route) => ({ userId: route.query.userId }),
      component: () => import('@/views/setup/account/add.vue'),
      meta: { title: '新增账户', pid: 'setup3', perm: 'sysAccount:add' }
    },
    {
      path: 'sys_account_edit',
      name: 'sysAccountEdit',
      hidden: true,
      props: (route) => ({ id: route.query.id }),
      component: () => import('@/views/setup/account/add.vue'),
      meta: { title: '修改账户', pid: 'setup3', perm: 'sysAccount:edit' }
    }
  ]
}
